import Vue from 'vue'
import { Button, Input, Form, FormItem, Message, main, aside, container, header, MenuItem, Menu, MenuItemGroup, Submenu, RadioGroup, RadioButton, Breadcrumb, BreadcrumbItem, Card, Row, Col, Table, TableColumn, Switch, Tooltip, Pagination, Dialog, MessageBox, Tag, Tree, Select, Option, Cascader, Alert, Tabs, TabPane, Step, Steps, CheckboxGroup, Checkbox, Upload, Timeline, TimelineItem } from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

// 使用数组遍历注册简化代码
const elements = [
  Button, Input, Form, FormItem, main, aside, container, header, Menu, MenuItem,
  MenuItemGroup, Submenu, RadioGroup, RadioButton, BreadcrumbItem, Breadcrumb, Card,
  Row, Col, Table, TableColumn, Switch, Tooltip, Pagination, Dialog, Tag, Tree, Select, Option, Cascader, Alert, Tabs, TabPane, Step, Steps, CheckboxGroup, Checkbox, Upload, Timeline, TimelineItem
]
elements.forEach(element => {
  Vue.use(element)
})
// Vue.prototype.$ELEMENT = { size: 'small', zIndex: 3000 }
// 挂载vue实例上
Vue.prototype.$message = Message
Vue.prototype.$confirm = MessageBox.confirm
